/**
 * AI助教接口
 */
import base from './base'
export default class AI extends base {
  // 付费学员选择专业列表
  static orderMajor(openId) {
    let url = this.baseUrl + `/getUserProfession.get?openId=${openId}`
    // let baseUrl = 'http://172.18.70.103:7300/mock/5c35ca6802500e31219d207e/study/'
    // let url = baseUrl + 'orderMajor'
    return this.get(url)
  }
  // 非付费学员专业列表
  static professionProvice() {
    let url = this.baseUrl + `/professionProvice.get`
    // let baseUrl = 'http://172.18.70.103:7300/mock/5c35ca6802500e31219d207e/study/'
    // let url = baseUrl + 'professionProvice'
    return this.get(url)
  }
  // 非付费学员省份列表
  static proviceProfession() {
    let url = this.baseUrl + `/proviceProfession.get`
    // let baseUrl = 'http://172.18.70.103:7300/mock/5c35ca6802500e31219d207e/study/'
    // let url = baseUrl + 'proviceProfession'
    return this.get(url)
  }
  // 付费学员初始问题
  static EntryQuestion (openId) {
    let url = this.baseUrl + `/aiEntryQuestion.get?openId=${openId}`
    // let baseUrl = 'http://172.18.70.103:7300/mock/5c35ca6802500e31219d207e/study/'
    // let url = baseUrl + `ai`
    return this.get(url)
  }
  // ai反馈答案
  static answer (questionNo, professionId, provinceId, openId) {
    let url = this.baseUrl + `/aiQuestion.get/?questionNo=${questionNo}&&professionId=${professionId}&&provinceId=${provinceId}&&openId=${openId}`
    // let baseUrl = 'http://172.18.70.103:7300/mock/5c35ca6802500e31219d207e/study/'
    // let url = baseUrl + `ai`
    return this.get(url)
  }
  // 保存非付费学员信息
  static savenopayuserinfo (openId, telephone, professionId, provinceId, aiHlepList) {
    let url = this.baseUrl + `/userhelp/savenopayuserinfo`
    // let baseUrl = 'http://172.18.70.103:7300/mock/5c35ca6802500e31219d207e/study/'
    // let url = baseUrl + `/userhelp/savenopayuserinfo`
    let params = {
      openId,
      telephone,
      professionId,
      provinceId,
      aiHlepList
    }
    return this.post(url, params)
  }
  static sleepTime(time) {
		return this.sleep(time)
  }
}
